<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="fragments/head :: head(~{:: title})">
    <title>构建新版本</title>
    <link rel="stylesheet" href="../../static/css/bootstrap.min.css"/>
</head>
<body>
<nav th:replace="fragments/navbar :: navbar">navbar</nav>
<div class="container-fluid">
    <div th:insert="fragments/alert :: alert">alert</div>
    <h3 class="text-center">构建新版本</h3>
    <div class="row">
        <form action="do" class="form-horizontal" role="form" method="post">
            <div class="form-group">
                <label class="col-sm-2 control-label" for="versionName">版本号：</label>
                <div class="col-sm-8">
                    <input id="versionName" name="versionName" class="form-control"
                           placeholder="请输入版本号"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">版本号：</label>
                <div class="col-sm-8">
                    <textarea class="form-control" id="remarks" name="remark" rows="3"></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="originVersion">源自：</label>
                <div class="col-sm-8">
                    <select id="originVersion" name="originVersion" class="form-control" readonly="readonly">
                        <option th:each="version : ${list}"
                                th:text="${version.versionName}"
                                th:value="${version.id}"
                                th:selected="${version.id eq '00000000000000000000000000000000'} ? 'selected'"></option>
                    </select>
                </div>
                <div class="col-sm-1">
                    <input type="button" value="选择源" class="form-control"
                           onclick="javascript:$('#fromVersion').removeAttr('readonly')"/>
                </div>
            </div>
            <div class="form-group text-center">
                <input type="submit" value="提交" />
            </div>
        </form>
    </div>
    <div th:replace="fragments/footer :: copy"></div>
</div>

</body>
</html>